import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login.vue'
import HomePage from '../views/HomePage.vue'
import Content from '../views/Content.vue'
import CalendarAll from '../views/CalendarAll.vue'
//分支
import BranchMain from '../views/BranchMain.vue'
import Organize from '../views/BranchPag/Organize.vue'
import Staff from '../views/BranchPag/Staff.vue'
import Present from '../views/BranchPag/Present.vue'
import Salary from '../views/BranchPag/Salary.vue'
import SocialSecurity from '../views/BranchPag/SocialSecurity.vue'
import Performance from '../views/BranchPag/Performance.vue'
import Hire from '../views/BranchPag/Hire.vue'
import Approve from '../views/BranchPag/Approve.vue'
import ConforenceRoom from '../views/BranchPag/ConforenceRoom.vue'
import Car from '../views/BranchPag/Car.vue'
import News from '../views/BranchPag/News.vue'
import Notice from '../views/BranchPag/Notice.vue'
import Contract from '../views/BranchPag/Contract.vue'
import Archive from '../views/BranchPag/Archive.vue'
import Property from '../views/BranchPag/Property.vue'
import Training from '../views/BranchPag/Training.vue'
import System from '../views/BranchPag/System.vue'

Vue.use(VueRouter)

const routes = [
	//登录页面
  {
    path: '/',
    name: 'login',
    component: Login
  },
  //首页
  {
    path: '/HomePage',
    name: 'all',
    component: HomePage,
    children:[
		{
		path: '/CalendarAll',
		components: {
		default: CalendarAll,
	  },
	},
	{
		path:'/content',
		components: {
		default:Content
		}
	}
	]
  },
  //分支页面
  {
	path:'/BranchMain',
	name:'BranchMain',
	component:BranchMain,
	children:[
		{
		path: '/Organize',
		name: 'Organize',
		components: {
		default: Organize,
	  	},
	},
	{
		path:'/Staff',
		name:'Staff',
		components: {
			default:Staff
		}
	},
	{
		path:'/Present',
		name:'Present',
		components: {
		default:Present
		}
	},
	{
		path:'/Salary',
		name:'Salary',
		components: {
		default:Salary
		}
	},
	{
		path:'/SocialSecurity',
		name:'SocialSecurity',
		components: {
		default:SocialSecurity
		}
	},
	{
		path:'/Performance',
		name:'Performance',
		components: {
		default:Performance
		}
	},
	{
		path:'/Hire',
		name:'Hire',
		components: {
		default:Hire
		}
	},
	{
		path:'/Approve',
		name:'Approve',
		components: {
			default:Approve
		}
	},
	{
		path:'/ConforenceRoom',
		name:'ConforenceRoom',
		components: {
		default:ConforenceRoom
		}
	},
	{
		path:'/Car',
		name:'Car',
		components: {
		default:Car
		}
	},
	{
		path:'/News',
		name:'News',
		components: {
		default:News
		}
	},
	{
		path:'/Notice',
		name:'Notice',
		components: {
		default:Notice
		}
	},
	{
		path:'/Contract',
		name:'Contract',
		components: {
		default:Contract
		}
	},
	{
		path:'/Archive',
		name:'Archive',
		components: {
		default:Archive
		}
	},
	{
		path:'/Property',
		name:'Property',
		components: {
		default:Property
		}
	},
	{
		path:'/Training',
		name:'Training',
		components: {
		default:Training
		}
	},
	{
		path:'/System',
		name:'System',
		components: {
		default:System
		}
	}
	]
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
